<!-- <p>double-bind works!</p> -->
<h1>双向数据绑定</h1>
<h2>单行文本框</h2>
<p>msg:{{msg}}</p>
<input type="text" [value]="msg" #input1 (input)="msg=input1.value">
<input type="text" [(ngModel)]="msg">
<hr>
<p>info:{{info}}</p>
<textarea name="" id="" cols="10" rows="10" [value]="info" #text1 (input)="info=text1.value"></textarea>
<textarea name="" id="" cols="10" rows="10" [(ngModel)]="info"></textarea>
<hr>
<p>radioData:{{radioData}}</p>
<input type="radio" value="a" [(ngModel)]="radioData">
<input type="radio" value="b" [(ngModel)]="radioData">
<input type="radio" value="c" [(ngModel)]="radioData">
<hr>
<input type="radio" value="a" #radio1 [checked]="radio1.value==radioData" (change)="radioData=$event.target.value">
<input type="radio" value="b" #radio2 [checked]="radio2.value==radioData" (change)="radioData=$event.target.value">
<input type="radio" value="c" #radio3 [checked]="radio3.value==radioData" (change)="radioData=$event.target.value">
<!-- <input type="button" value="绑定" (click)="msg=$event.target.value"> -->
